







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Determines if this bag is a proper subset of another bag. Neither bag is modified.
This bag is a subset of otherBag if every element in this bag
is also in otherBag, at least the same number of
times. Additional, this bag must have strictly fewer items than otherBag.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public bool IsProperSubsetOf( Bag<T> otherBag ) |
Visual Basic (Declaration) |
---|
Public Function IsProperSubsetOf ( _ otherBag As Bag(Of T) _ ) As Boolean |
Visual C++ |
---|
public: bool IsProperSubsetOf ( Bag<T>^ otherBag ) |
Parameters
- otherBag
- Bag<(Of <T>)>
Bag to compare to.
Return Value
True if this is a proper subset of otherBag.
Remarks
IsProperSubsetOf is computed in time O(N), where N is the number of unique items in this bag.
Exceptions
Exception | Condition |
---|---|
System..::InvalidOperationException | This bag and otherBag don't use the same method for comparing items. |
See Also
Bag<(Of <T>)> Class
Wintellect.PowerCollections Namespace